<!DOCTYPE html>
<html lang="en">
<!-- 百分比布局 -->
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0
        }
        section {
            /* 随着视口放大 最多到980px */
            max-width: 980px;
            min-width: 320px;
            width: 100%;
            margin: 0 auto;
        }

        section div{
            float: left;
            width: 50%;
            height: 400px;
        }

        section div:nth-child(1) {
            background-color: pink;
        }

        section div:nth-child(2) {
            background-color: yellow;
        }
    </style>
</head>

<body>
    <section>
        <div></div>
        <div></div>
    </section>
</body>

</html>